const USER_ROLE = {
  // 平台管理员
  ADMIN: "admin",
  // 物资部人员
  MATERIAL: "material",
  // 主业需求计划提报人员
  MAIN: "main",
  // 产业需求计划提报人员
  SUB: "industry",
};

const USER_ROLE_LIST = [
  {
    role: USER_ROLE.ADMIN,
    name: "系统管理员",
  },
  {
    role: USER_ROLE.MATERIAL,
    name: "物资部人员",
  },
  {
    role: USER_ROLE.MAIN,
    name: "主业计划提报人员",
  },
  {
    role: USER_ROLE.SUB,
    name: "产业计划提报人员",
  },
];

const systemMenu = [
  // 首页菜单暂不配置
  // {
  //   index: "dashboard",
  //   path: "/common/dashboard/dashboard",
  //   title: "首页",
  //   roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL, USER_ROLE.MAIN, USER_ROLE.SUB],
  //   meta: { icon: "el-icon-s-home" },
  // },
  {
    index: "review",
    title: "审核工作台",
    roles: [USER_ROLE.ADMIN],
    meta: { icon: "el-icon-menu" },
    children: [
      {
        index: "maintaskprequalification",
        path: "/review/maintask/prequalification",
        title: "主业预审",
        roles: [USER_ROLE.MAIN],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.MAIN],
        meta: {},
      },
      {
        index: "maintaskprequalificationdetail",
        path: "/review/maintask/prequalificationdetail",
        title: "主业预审详情",
        roles: [USER_ROLE.MAIN],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.MAIN],
        hidden: true,
        parent: "maintaskprequalification",
        meta: { activeMenu: "/review/maintask/prequalification" },
      },
      {
        index: "mainprematerialdetail",
        path: "/review/maintask/prematerialdetail",
        title: "主业预审物资详情",
        roles: [USER_ROLE.MAIN],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.MAIN],
        hidden: true,
        parent: "maintaskprequalificationdetail",
        meta: { activeMenu: "/review/maintask/prequalification" },
      },
      {
        index: "maintaskdataquery",
        path: "/review/maintask/dataquery",
        title: "主业资料查询",
        roles: [USER_ROLE.MAIN],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.MAIN],
        meta: {},
      },
      {
        index: "maintask",
        title: "智能审核（主业）",
        roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
        meta: {},
        children: [
          {
            index: "maintaskplanreview",
            path: "/review/maintask/planreview",
            title: "主业计划审核",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
            meta: {},
          },
          {
            index: "maintaskplanreviewdetail",
            path: "/review/maintask/planreviewdetail",
            title: "主业计划审核详情",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
            hidden: true,
            parent: "maintaskplanreview",
            meta: { activeMenu: "/review/maintask/planreview" },
          },
          {
            index: "mainmaterialdetail",
            path: "/review/maintask/materialdetail",
            title: "主业计划审核物资详情",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
            hidden: true,
            parent: "maintaskplanreviewdetail",
            meta: { activeMenu: "/review/maintask/planreview" },
          },
          {
            index: "maintaskdatamanage",
            path: "/review/maintask/datamanage",
            title: "主业资料管理",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
          },
        ],
      },
      {
        index: "subtaskprequalification",
        path: "/review/subtask/prequalification",
        title: "产业预审",
        roles: [USER_ROLE.SUB],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.SUB],
      },
      {
        index: "subtaskprequalificationdetail",
        path: "/review/subtask/prequalificationdetail",
        title: "产业预审详情",
        roles: [USER_ROLE.SUB],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.SUB],
        hidden: true,
        parent: "subtaskprequalification",
        meta: { activeMenu: "/review/subtask/prequalification" },
      },
      {
        index: "subprematerialdetail",
        path: "/review/subtask/prematerialdetail",
        title: "产业预审物资详情",
        roles: [USER_ROLE.SUB],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.SUB],
        hidden: true,
        parent: "subtaskprequalificationdetail",
        meta: { activeMenu: "/review/subtask/prequalification" },
      },
      {
        index: "subtaskdataquery",
        path: "/review/subtask/dataquery",
        title: "产业资料查询",
        roles: [USER_ROLE.SUB],
        // roles: [USER_ROLE.ADMIN, USER_ROLE.SUB],
      },
      {
        index: "subtask",
        title: "智能审核（产业）",
        roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
        children: [
          {
            index: "subtaskplanreview",
            path: "/review/subtask/planreview",
            title: "产业计划审核",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
          },
          {
            index: "subtaskplanreviewdetail",
            path: "/review/subtask/planreviewdetail",
            title: "产业计划审核详情",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
            hidden: true,
            parent: "subtaskplanreview",
            meta: { activeMenu: "/review/subtask/planreview" },
          },
          {
            index: "submaterialdetail",
            path: "/review/subtask/materialdetail",
            title: "产业计划审核物资详情",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
            hidden: true,
            parent: "subtaskplanreviewdetail",
            meta: { activeMenu: "/review/subtask/planreview" },
          },
          {
            index: "subtaskspecificationreview",
            path: "/review/subtask/specificationreview",
            title: "产业技术规范书审核",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
          },
          {
            index: "subtaskspecificationdetail",
            path: "/review/subtask/specificationdetail",
            title: "产业技术规范书审核详情",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
            hidden: true,
            parent: "subtaskspecificationreview",
            meta: { activeMenu: "/review/subtask/specificationreview" },
          },
          {
            index: "subtaskdatamanage",
            path: "/review/subtask/datamanage",
            title: "产业资料管理",
            roles: [USER_ROLE.ADMIN, USER_ROLE.MATERIAL],
          },
        ],
      },
    ],
  },
  {
    index: "system-manage",
    title: "系统管理",
    roles: [USER_ROLE.ADMIN],
    meta: { icon: "el-icon-s-tools" },
    children: [
      {
        index: "systemaccount",
        path: "/system/account/account",
        title: "账号管理",
        roles: [USER_ROLE.ADMIN],
      },
    ],
  },
];

export default { SYSTEM_MENU: systemMenu, USER_ROLE_LIST: USER_ROLE_LIST };
